package com.jysz.certificate.service.cm;


import java.util.List;

import javax.annotation.Resource;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Service;

import com.jysz.certificate.persistence.dao.cm.RecordReturnDao;
import com.jysz.certificate.persistence.model.cm.RecordReturn;
import com.jysz.webcore.ssh.service.EntityService;

@Service
public class RecordReturnService  extends EntityService<RecordReturn,Long,RecordReturnDao>{

	@Resource
	public RecordReturnDao recordReturnDao;

	@Override
	public RecordReturnDao getEntityDao() {
		// TODO Auto-generated method stub
		return recordReturnDao;
	}
	
	public List<RecordReturn> fianCertifiList(Long crId){
		Criteria criteria = recordReturnDao.createCriteria();
		criteria.add(Restrictions.eq("cerId", crId));
		return criteria.list();
	}
}
